<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        *{
            margin:0;
            padding:0;
        }
        ul,li{
            list-style: none;
        }
        #box{
            width:300px;
            height:200px;
            margin:0 auto;
            border:5px solid red;
            position:relative;
            overflow: hidden;
        }
        #box ul{
            width:1200px;
            height:200px;
            position:absolute;
            left:0;
            top:0;
            border:1px solid blue;
        }
        #box ul li{
            width:300px;
            height:200px;
            float:left;
        }
        #box ul li:nth-of-type(1){
            background: cadetblue;
        }
        #box ul li:nth-of-type(2){
            background: chocolate;
        }
        #box ul li:nth-of-type(3){
            background: cornflowerblue;
        }
        #box ul li:nth-of-type(4){
            background: blueviolet;
        }
    </style>
    <script src="../jquery-1.7.2.min.js"></script>
    <script>
        $(function(){

            var i=0;//大总管
            var timer = setInterval(function(){
                i++;
                if(i>3){
                    i=0;
                    $('#box ul').css('left',0);
                }
                $('#box ul').animate({left:-300*i},300);
            },1000);
        })
    </script>
</head>
<body>
    <div id="box">
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>1</li>
        </ul>
    </div>
</body>
</html>